var option2020 = {
    title: {
        text: '2020代码新增统计图'
    },
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'cross',
            label: {
                backgroundColor: '#6a7985'
            }
        }
    },
    legend: {
        data: ['cpp', 'java', 'js', 'py']
    },
    toolbox: {},
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    xAxis: [{
        type: 'category',
        boundaryGap: false,
        data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '11', '12']
    }],
    yAxis: [{
        type: 'value',
        max: 20000,
        axisLabel: {
            interval: 5000,
        },
    }],
    series: [{
            "name": "cpp",
            "type": "line",
            "stack": "总量",
            "areaStyle": {},
            "emphasis": {
                "focus": "series"
            },
            "data": [
                1056,
                3875,
                17670,
                12309,
                635,
                200,
                1708,
                4508,
                5305,
                0,
                5004,
                6297
            ]
        },
        {
            "name": "java",
            "type": "line",
            "stack": "总量",
            "areaStyle": {},
            "emphasis": {
                "focus": "series"
            },
            "data": [
                0,
                29,
                0,
                0,
                1033,
                3242,
                26,
                0,
                0,
                699,
                69,
                50
            ]
        },
        {
            "name": "py",
            "type": "line",
            "stack": "总量",
            "areaStyle": {},
            "emphasis": {
                "focus": "series"
            },
            "data": [
                0,
                1627,
                1334,
                0,
                1084,
                500,
                579,
                183,
                68,
                0,
                0,
                151
            ]
        },
        {
            "name": "js",
            "type": "line",
            "stack": "总量",
            "areaStyle": {},
            "emphasis": {
                "focus": "series"
            },
            "data": [
                0,
                0,
                0,
                0,
                4197,
                7393,
                43,
                0,
                0,
                998,
                718,
                214
            ]
        }
    ]
};

var chartDom = document.getElementById('2020');
var myChart = echarts.init(chartDom, 'dark');
option2020 && myChart.setOption(option2020);